package com.hzdh.account.commom.enums;

import lombok.Getter;

@Getter
public enum TypeEnums {

	ZTC("ZTC", "直通车"),
	SD("SD", "刷单"),
	KDF("KDF", "快递费"),
	MJX("MJX", "买家秀"),
	ZZ("ZZ", "转账"),
	BGYP("BGYP", "办公用品"),
	RJXF("RJXF", "软件消费"),
	CY("CY", "餐饮"),
	QT("QT", "其他");
	
	private String name;
	
	private String code;

	TypeEnums(String code, String name) {
		this.code = code;
		this.name = name;
	}

	/**
	 * 根据code获取name
	 * @param code
	 * @return
	 */
	public static String getName(String code) {
		for (TypeEnums te : TypeEnums.values()) {
			if (code.equalsIgnoreCase(te.getCode()))
				return te.getCode();
			}
		return null;
	}
}
